// ****************************************************************************** 
// Copyright     :  Copyright (C) 2018, Hisilicon Technologies Co. Ltd.
// File name     :  glb_cfg_vclk_c_union_define.h
// Project line  :  K3
// Department    :  K3
// Author        :  Huawei
// Version       :  V100
// Date          :  2015/4/10
// Description   :  HiVcodecV100 VDEC
// Others        :  Generated automatically by nManager V4.2 
// History       :  Huawei 2018/04/10 10:02:39 Create file
// ******************************************************************************

#ifndef __GLB_CFG_VCLK_C_UNION_DEFINE_H__
#define __GLB_CFG_VCLK_C_UNION_DEFINE_H__

/* Define the union U_AVS_PLUS */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    test_reserve0 : 31  ; /* [31:1] */
        unsigned int    is_avsplus    : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_AVS_PLUS;

/* Define the union U_EMAR_ADDR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_0               : 16  ; /* [31:16] */
        unsigned int    acfg2arb_repeat_cnt : 4  ; /* [15:12] */
        unsigned int    rsv_1               : 2  ; /* [11:10] */
        unsigned int    acfg2arb_ramtype    : 2  ; /* [9:8] */
        unsigned int    rsv_2               : 3  ; /* [7:5] */
        unsigned int    axi_4k_bypass       : 1  ; /* [4] */
        unsigned int    rsv_3               : 2  ; /* [3:2] */
        unsigned int    axi_sep_typ         : 2  ; /* [1:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_EMAR_ADDR;

/* Define the union U_VDH_RST_EN */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    test_reserve1 : 30  ; /* [31:2] */
        unsigned int    debug_en      : 1  ; /* [1] */
        unsigned int    rstself_or_no : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_VDH_RST_EN;

/* Define the union U_CK_GT_EN */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_4                      : 30  ; /* [31:2] */
        unsigned int    memroy_clock_gating_en_tmp : 1  ; /* [1] */
        unsigned int    module_clock_gating_en     : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_CK_GT_EN;

/* Define the union U_VDH_USE_STATE */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    vdh_use_state : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_VDH_USE_STATE;

/* Define the union U_OVER_TIME */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    over_time : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_OVER_TIME;

/* Define the union U_VDH_ARQOS */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_5              : 19  ; /* [31:13] */
        unsigned int    cfg_arqos_flag     : 1  ; /* [12] */
        unsigned int    rsv_6              : 1  ; /* [11] */
        unsigned int    cfg_prc_head_arqos : 3  ; /* [10:8] */
        unsigned int    rsv_7              : 1  ; /* [7] */
        unsigned int    cfg_prc_data_arqos : 3  ; /* [6:4] */
        unsigned int    rsv_8              : 1  ; /* [3] */
        unsigned int    cfg_default_arqos  : 3  ; /* [2:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_VDH_ARQOS;

/* Define the union U_VDH_ARQOS_CYCLE */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    vdh_arqos_cycle : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_VDH_ARQOS_CYCLE;

/* Define the union U_VDH_ARQOS_NUMBERS */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    vdh_arqos_numbers : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_VDH_ARQOS_NUMBERS;

/* Define the union U_EMAR_ADDR1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_9                   : 18  ; /* [31:14] */
        unsigned int    acfg2arb_ch1_max_repeat : 6  ; /* [13:8] */
        unsigned int    rsv_10                  : 2  ; /* [7:6] */
        unsigned int    acfg2arb_ch0_max_repeat : 6  ; /* [5:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_EMAR_ADDR1;

/* Define the union U_VDH_FORCE_REQ_ACK */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_11             : 30  ; /* [31:2] */
        unsigned int    scd_force_req_ack  : 1  ; /* [1] */
        unsigned int    mfde_force_req_ack : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_VDH_FORCE_REQ_ACK;

/* Define the union U_VDH_RFS_RAS_EMA */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    mem_ctrl_rfs : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_VDH_RFS_RAS_EMA;

/* Define the union U_VDH_RFT_EMA */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    mem_ctrl_rft : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_VDH_RFT_EMA;

/* Define the union U_VDH_ROM_EMA */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    mem_ctrl_rom : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_VDH_ROM_EMA;

/* Define the union U_VDH_MEM_ECC */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_12             : 30  ; /* [31:2] */
        unsigned int    ecc_bypass         : 1  ; /* [1] */
        unsigned int    mem_err_check_flag : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_VDH_MEM_ECC;


//==============================================================================
/* Define the global struct */
typedef struct
{
    volatile U_AVS_PLUS          AVS_PLUS          ; /* 0 */
    volatile U_EMAR_ADDR         EMAR_ADDR         ; /* 4 */
    volatile U_VDH_RST_EN        VDH_RST_EN        ; /* 8 */
    volatile U_CK_GT_EN          CK_GT_EN          ; /* C */
    volatile U_VDH_USE_STATE     VDH_USE_STATE     ; /* 10 */
    volatile U_OVER_TIME         OVER_TIME         ; /* 18 */
    volatile U_VDH_ARQOS         VDH_ARQOS         ; /* 24 */
    volatile U_VDH_ARQOS_CYCLE   VDH_ARQOS_CYCLE   ; /* 28 */
    volatile U_VDH_ARQOS_NUMBERS VDH_ARQOS_NUMBERS ; /* 2C */
    volatile U_EMAR_ADDR1        EMAR_ADDR1        ; /* 30 */
    volatile U_VDH_FORCE_REQ_ACK VDH_FORCE_REQ_ACK ; /* 34 */
    volatile U_VDH_RFS_RAS_EMA   VDH_RFS_RAS_EMA   ; /* 70 */
    volatile U_VDH_RFT_EMA       VDH_RFT_EMA       ; /* 74 */
    volatile U_VDH_ROM_EMA       VDH_ROM_EMA       ; /* 78 */
    volatile U_VDH_MEM_ECC       VDH_MEM_ECC       ; /* 7C */

} S_glb_cfg_vclk_REGS_TYPE;

/* Declare the struct pointor of the module glb_cfg_vclk */
extern volatile S_glb_cfg_vclk_REGS_TYPE *gopglb_cfg_vclkAllReg;

/* Declare the functions that set the member value */
int iSetAVS_PLUS_test_reserve0(unsigned int utest_reserve0);
int iSetAVS_PLUS_is_avsplus(unsigned int uis_avsplus);
int iSetEMAR_ADDR_acfg2arb_repeat_cnt(unsigned int uacfg2arb_repeat_cnt);
int iSetEMAR_ADDR_acfg2arb_ramtype(unsigned int uacfg2arb_ramtype);
int iSetEMAR_ADDR_axi_4k_bypass(unsigned int uaxi_4k_bypass);
int iSetEMAR_ADDR_axi_sep_typ(unsigned int uaxi_sep_typ);
int iSetVDH_RST_EN_test_reserve1(unsigned int utest_reserve1);
int iSetVDH_RST_EN_debug_en(unsigned int udebug_en);
int iSetVDH_RST_EN_rstself_or_no(unsigned int urstself_or_no);
int iSetCK_GT_EN_memroy_clock_gating_en_tmp(unsigned int umemroy_clock_gating_en_tmp);
int iSetCK_GT_EN_module_clock_gating_en(unsigned int umodule_clock_gating_en);
int iSetVDH_USE_STATE_vdh_use_state(unsigned int uvdh_use_state);
int iSetOVER_TIME_over_time(unsigned int uover_time);
int iSetVDH_ARQOS_cfg_arqos_flag(unsigned int ucfg_arqos_flag);
int iSetVDH_ARQOS_cfg_prc_head_arqos(unsigned int ucfg_prc_head_arqos);
int iSetVDH_ARQOS_cfg_prc_data_arqos(unsigned int ucfg_prc_data_arqos);
int iSetVDH_ARQOS_cfg_default_arqos(unsigned int ucfg_default_arqos);
int iSetVDH_ARQOS_CYCLE_vdh_arqos_cycle(unsigned int uvdh_arqos_cycle);
int iSetVDH_ARQOS_NUMBERS_vdh_arqos_numbers(unsigned int uvdh_arqos_numbers);
int iSetEMAR_ADDR1_acfg2arb_ch1_max_repeat(unsigned int uacfg2arb_ch1_max_repeat);
int iSetEMAR_ADDR1_acfg2arb_ch0_max_repeat(unsigned int uacfg2arb_ch0_max_repeat);
int iSetVDH_FORCE_REQ_ACK_scd_force_req_ack(unsigned int uscd_force_req_ack);
int iSetVDH_FORCE_REQ_ACK_mfde_force_req_ack(unsigned int umfde_force_req_ack);
int iSetVDH_RFS_RAS_EMA_mem_ctrl_rfs(unsigned int umem_ctrl_rfs);
int iSetVDH_RFT_EMA_mem_ctrl_rft(unsigned int umem_ctrl_rft);
int iSetVDH_ROM_EMA_mem_ctrl_rom(unsigned int umem_ctrl_rom);
int iSetVDH_MEM_ECC_ecc_bypass(unsigned int uecc_bypass);
int iSetVDH_MEM_ECC_mem_err_check_flag(unsigned int umem_err_check_flag);

#endif // __GLB_CFG_VCLK_C_UNION_DEFINE_H__
